Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip - from 94683 - remove input lock and rely on canceling pending change #94787

Conversation

Addison-Stavlo
Copy link
Contributor

@Addison-Stavlo Addison-Stavlo commented Sep 20, 2024

Related to # #94683

Proposed Changes

simplifies #94683 some as an alternative simple approach (as suggested in item 2 of this comment #94247 (comment)). I am now thinking this is what we will want and plan to merge this into that branch if designers agree.

  • Alternatively to the approach in the linked PR: here we don't add any other locking for the input, nor do we allow editing the input when a pending change is present. We lean into the "cancel pending email change" functionality to instead unlock the locked input in that pending email case.

The noted input explanations have been adapted to fit this as well. The "click here" is what now cancells the pending email change and unlocks the input:

Pending email change (no domains):
Screenshot 2024-09-20 at 4 05 12 PM

Pending email change (with domains):
Screenshot 2024-09-20 at 4 06 11 PM
^^ todo: probably want to edit that blue anchor to the underlined style? or do we let it have a separate style since its not an inline action and redirects to another page?

Email not verified:
Screenshot 2024-09-20 at 4 06 57 PM

General case:
Screenshot 2024-09-20 at 4 07 36 PM

Why are these changes being made?

Testing Instructions

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 20, 2024
@Addison-Stavlo Addison-Stavlo self-assigned this Sep 20, 2024
@matticbot
Copy link
Contributor

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~39 bytes added 📈 [gzipped])

name                   parsed_size           gzip_size
entry-stepper              +1254 B  (+0.1%)      -30 B  (-0.0%)
entry-main                 +1254 B  (+0.1%)      +13 B  (+0.0%)
entry-login                 -366 B  (-0.0%)     -139 B  (-0.0%)
entry-subscriptions         -295 B  (-0.0%)     -196 B  (-0.0%)
entry-domains-landing       -295 B  (-0.0%)     -113 B  (-0.1%)
entry-browsehappy           -295 B  (-0.1%)     -113 B  (-0.2%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~4783 bytes removed 📉 [gzipped])

name                             parsed_size           gzip_size
site-blocks                         +37091 B  (+4.9%)   +13424 B  (+6.3%)
privacy                             +37091 B  (+5.0%)   +13953 B  (+6.7%)
me                                  +37091 B  (+5.2%)   +13423 B  (+6.6%)
help                                +37091 B  (+4.9%)   +13429 B  (+6.3%)
developer                           +37091 B  (+5.0%)   +13995 B  (+6.7%)
account-close                       +37091 B  (+5.0%)   +13430 B  (+6.5%)
notification-settings               +35851 B  (+4.3%)   +13279 B  (+5.7%)
security                            +35640 B  (+3.7%)   +13204 B  (+5.0%)
account                             +34181 B  (+3.7%)   +13845 B  (+5.3%)
purchases                            +2660 B  (+0.1%)    +2914 B  (+0.5%)
site-purchases                        +563 B  (+0.0%)    +1581 B  (+0.4%)
stats                                 -484 B  (-0.0%)    +1109 B  (+0.3%)
people                                -449 B  (-0.1%)     -334 B  (-0.2%)
domains                               +448 B  (+0.0%)    +1606 B  (+0.3%)
themes                                -418 B  (-0.0%)    -1372 B  (-0.5%)
marketplace                           +360 B  (+0.0%)    +1979 B  (+0.7%)
checkout                              -329 B  (-0.0%)     -259 B  (-0.1%)
import                                +313 B  (+0.0%)     -685 B  (-0.3%)
settings-newsletter                   -309 B  (-0.1%)     +281 B  (+0.2%)
settings-writing                      -206 B  (-0.0%)      -48 B  (-0.0%)
settings                              +200 B  (+0.0%)    +2226 B  (+0.9%)
home                                  +196 B  (+0.0%)     +987 B  (+0.2%)
hosting                               -188 B  (-0.0%)    -1026 B  (-0.2%)
plans                                 -164 B  (-0.0%)     -877 B  (-0.2%)
jetpack-cloud-settings                 -93 B  (-0.0%)     -698 B  (-0.4%)
settings-podcast                       +73 B  (+0.0%)    +1221 B  (+0.8%)
link-in-bio-tld-flow                   -72 B  (-0.0%)      -24 B  (-0.0%)
theme                                  +71 B  (+0.0%)     -174 B  (-0.1%)
media                                  +69 B  (+0.0%)    +1457 B  (+0.4%)
update-design-flow                     -48 B  (-0.0%)      -25 B  (-0.0%)
signup                                 -48 B  (-0.0%)      -17 B  (-0.0%)
write-flow                             -24 B  (-0.0%)       -7 B  (-0.0%)
videopress-flow                        -24 B  (-0.0%)       -5 B  (-0.0%)
staging-site                           -24 B  (-0.0%)       -6 B  (-0.0%)
settings-security                      -24 B  (-0.0%)       -5 B  (-0.0%)
settings-performance                   -24 B  (-0.0%)       -6 B  (-0.0%)
posts-custom                           -24 B  (-0.0%)     +248 B  (+0.1%)
posts                                  -24 B  (-0.0%)     +248 B  (+0.1%)
plugins                                -24 B  (-0.0%)     +557 B  (+0.1%)
marketing                              -24 B  (-0.0%)       -6 B  (-0.0%)
jetpack-cloud-plugin-management        -24 B  (-0.0%)     +362 B  (+0.1%)
earn                                   -24 B  (-0.0%)       -5 B  (-0.0%)
build-flow                             -24 B  (-0.0%)       -7 B  (-0.0%)
activity                               -24 B  (-0.0%)     +151 B  (+0.1%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~17565 bytes added 📈 [gzipped])

name                                                                              parsed_size           gzip_size
async-load-signup-steps-p2-complete-profile                                            +981 B  (+1.1%)     +236 B  (+0.8%)
async-load-calypso-my-sites-checkout-modal                                             -196 B  (-0.0%)     -632 B  (-0.2%)
async-load-calypso-blocks-editor-checkout-modal                                        -196 B  (-0.0%)     -819 B  (-0.3%)
async-load-automattic-help-center                                                      +196 B  (+0.0%)     +725 B  (+0.4%)
async-load-calypso-post-editor-editor-media-modal                                      +172 B  (+0.0%)     +800 B  (+0.2%)
async-load-signup-steps-design-picker                                                  +100 B  (+0.2%)      -10 B  (-0.1%)
async-load-calypso-layout-masterbar-checkout-tsx                                        -71 B  (-0.1%)      -65 B  (-0.2%)
async-load-calypso-layout-masterbar-checkout                                            -71 B  (-0.1%)     -154 B  (-0.6%)
async-load-design-blocks                                                                -24 B  (-0.0%)       +2 B  (+0.0%)
async-load-calypso-reader-sidebar                                                       -24 B  (-0.0%)       -5 B  (-0.0%)
async-load-calypso-my-sites-stats-summary                                               -24 B  (-0.0%)       -8 B  (-0.1%)
async-load-calypso-my-sites-current-site-notice                                         -24 B  (-0.0%)       -7 B  (-0.0%)
async-load-calypso-components-web-preview-component                                     -24 B  (-0.0%)       -7 B  (-0.0%)
async-load-calypso-blocks-jitm-templates-sidebar-banner                                 -24 B  (-0.1%)       -5 B  (-0.0%)
async-load-calypso-blocks-jitm-templates-notice                                         -24 B  (-0.1%)       -6 B  (-0.0%)
async-load-calypso-blocks-jitm-templates-default                                        -24 B  (-0.1%)       -6 B  (-0.0%)
async-load-signup-steps-page-picker                                                     -12 B  (-0.0%)      -13 B  (-0.0%)
async-load-purchase-modal-wrapper                                                       -12 B  (-0.0%)       -6 B  (-0.0%)
async-load-my-sites-checkout-purchase-modal-is-eligible-for-one-click-checkou...        -12 B  (-0.0%)      -41 B  (-0.0%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@Addison-Stavlo Addison-Stavlo changed the title remove input lock and rely on canceling pending change wip - from 94683 - remove input lock and rely on canceling pending change Sep 20, 2024
@Addison-Stavlo Addison-Stavlo marked this pull request as ready for review September 23, 2024 19:26
@Addison-Stavlo
Copy link
Contributor Author

Im merging this into #94683 since it is indeed closer to what we want. However, we are still finalizing some details in discussion on #94247

@Addison-Stavlo Addison-Stavlo merged commit 79f9629 into update/email-verification-form-and-notice Sep 23, 2024
19 checks passed
@Addison-Stavlo Addison-Stavlo deleted the update/email-verification-form-notice-take-2 branch September 23, 2024 19:27
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 23, 2024
Addison-Stavlo added a commit that referenced this pull request Oct 7, 2024
…ate copies and success messages. (#94683)

* remove notice under input and update copy

* update success notices

* add fallback for one of those...

* focus input on unlock

* init new banner component

* add notice icon

* move notice out of content frame

* style banner to fit and remove bad unused style rule for mobile

* add banner to account page

* update unlock field button styles

* add note to self

* remove unused component

* unlock and highlight input when change is clicked from modal on the page with that form

* ensure dialog closes on route change

* adjust button and anchor style to be consistent

* allow editing pending email

* allow saving pending email change in security form

* show correct email with change notice on security input

* send success email message from account component

* move emailToShow to component state and control with hooks, fixes issue with input jumping to pending value if you type in old email value.

* fix duplicate notices and only show email when it changed with that submission

* expand explanation text for domains and cancel pending cases

* more commenting around emailSettingToShow state

* remove test file for removed component

* remove input lock and rely on canceling pending change (#94787)

* add notice on confirmed email change

* remove extra domain info on pending change description, the change is still pending

* update copy per design

* consolidate success messages

* add scroll and focus functionality from help dialog

* make the scrollTo smooth

* fix resend email for pending email change

* fix failing gravatar tests

* add cursor pointer to the change button

* fix dialog to close on clicking backdrop

* allow scroll/focus from external pages

* allow scrollTo functionality from /me to work even if /me/account was previously loaded

* fix css bracket removed in merge conflict

* fix import order

* fix layout frame regression

* fix issue with wrong email shown in modal, and href overtaking the banner in some circumstances
Addison-Stavlo added a commit that referenced this pull request Oct 7, 2024
* remove notice under input and update copy

* update success notices

* add fallback for one of those...

* focus input on unlock

* init new banner component

* add notice icon

* move notice out of content frame

* style banner to fit and remove bad unused style rule for mobile

* add banner to account page

* update unlock field button styles

* add note to self

* remove unused component

* unlock and highlight input when change is clicked from modal on the page with that form

* ensure dialog closes on route change

* adjust button and anchor style to be consistent

* allow editing pending email

* allow saving pending email change in security form

* show correct email with change notice on security input

* send success email message from account component

* move emailToShow to component state and control with hooks, fixes issue with input jumping to pending value if you type in old email value.

* fix duplicate notices and only show email when it changed with that submission

* expand explanation text for domains and cancel pending cases

* more commenting around emailSettingToShow state

* remove test file for removed component

* remove input lock and rely on canceling pending change (#94787)

* add notice on confirmed email change

* remove extra domain info on pending change description, the change is still pending

* update copy per design

* consolidate success messages

* add scroll and focus functionality from help dialog

* make the scrollTo smooth

* fix resend email for pending email change

* fix failing gravatar tests

* add cursor pointer to the change button

* fix dialog to close on clicking backdrop

* allow scroll/focus from external pages

* allow scrollTo functionality from /me to work even if /me/account was previously loaded

* fix css bracket removed in merge conflict

* fix import order

* fix layout frame regression

* fix issue with wrong email shown in modal, and href overtaking the banner in some circumstances

* add tests for verification banner

* update test descriptions

* fix warnings from new tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants